package com.example.zbh.dsliao.presenter;

import com.example.zbh.dsliao.model.SearchModel;
import com.example.zbh.dsliao.model.modelinterface.ManagerDataListener;
import com.example.zbh.dsliao.presenter.presenterinterface.HandMessageListener;
import com.example.zbh.dsliao.ui.viewinterface.ShowDownLoaderResultListener;

import java.util.List;


/**
 * Created by zbh on 15/12/7.
 */
public class SearchPresenter extends BasePresenter<ShowDownLoaderResultListener> implements HandMessageListener {
    private ShowDownLoaderResultListener resultListener;
    private ManagerDataListener dataListener;


    public SearchPresenter(ShowDownLoaderResultListener resultListener) {
        this.resultListener = resultListener;
        dataListener = new SearchModel();
    }
    public void startSearchConnection(String url){
        dataListener.sendResult(url, this);

    }


    @Override
    public void handResult(List list) {
        resultListener.showResult(list);
    }

    @Override
    public void handOtherResult(List list) {
        resultListener.showOtherResult(list);
    }
}
